<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<rapid:override name="frame-header-style">
</rapid:override>
<rapid:override name="frame-content"> '
        <div style="padding: 15px;">
            <blockquote class="layui-elem-quote">
        <span class="layui-breadcrumb" lay-separator="/">
              <a href="/admin">首页</a>
              <a href="/admin/notice">公告列表</a>
              <a><cite>修改公告</cite></a>
        </span>
    </blockquote>

    <form class="layui-form"  method="post" id="myForm" action="notice/update">
    	<input type="hidden" id="noticeId" name="noticeId" value="${notice.noticeId}" >
        <div class="layui-form-item">
            <label class="layui-form-label">标题  <span style="color: #FF5722; ">*</span></label>
            <div class="layui-input-block">
                <input type="text" name="noticeTitle" lay-verify="title" id="title" class="layui-input" required value="${notice.noticeTitle }">
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">内容  <span style="color: #FF5722; ">*</span></label>
            <div class="layui-input-block">
                <textarea name="noticeContent"  id="content" >${notice.noticeContent }</textarea>
            </div>
        </div>
        
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="" lay-filter="" >修改</button> ${msg }
            </div>
        </div>
    </form>
</div>
</rapid:override>

<rapid:override name="frame-footer-script">
<script>
        layui.use(['form',  'laydate'], function() {
            var form = layui.form
                , layer = layui.layer
                , laydate = layui.laydate;


            //自定义验证规则
            form.verify({
                title: function (value) {
                    if (value.length < 5) {
                        return '标题至少得5个字符啊';
                    }
                }
                ,content: function (value) {
                   // layedit.sync(editIndex);
                }
            });
        });
        //end
    </script>
    <link rel="stylesheet" href="resources/kindeditor/plugins/code/prettify.css" />
			<link rel="stylesheet" href="resources/kindeditor/themes/default/default.css" />
			<script charset="utf-8" src="static/kindeditor/kindeditor-all-min.js"></script>
			<script charset="utf-8" src="static/kindeditor/lang/zh-CN.js"></script>
			<script charset="utf-8" src="static/kindeditor/plugins/code/prettify.js"></script>
						<script>
					KindEditor.ready(function(K) {
						var editor1 = K.create('textarea[id="content"]', {   //指向了页面中 id=content 的那个元素 
					        //cssPath : 'static/kindeditor/themes/qq/qq.css',
							uploadJson : 'notice/uploadImg',
							allowFileManager : true,
							width:"1100px",
							height:"420px"
						});
						prettyPrint();
					});
			</script>
</rapid:override>
<%@ include file="../framework.jsp" %>